class WorkerEducationBackgroundModel {
  String name;
  String tizhong;
  String jiguan;
  String zhuanye;
  String sex;
  String hunyinzhuangtai;
  String minzu;
  String gongzuonianxian;
  String zhengzhimianmao;
  String hukoudizhi;
  String xianzhudizhi;
  String jinjilianxiren;
  String jinjilianxirendianhua;
  String chushengnianyue;

//性别
  String get legalSexStr {
    return int.parse(sex) == 1 ? '男' : int.parse(sex) == 2 ? '女' : '';
  }

//婚姻状态
  String get maritalStatusStr {
    return int.parse(hunyinzhuangtai) == 1
        ? '单身'
        : int.parse(hunyinzhuangtai) == 2 ? '结婚' : '';
  }

  WorkerEducationBackgroundModel({
    this.name,
    this.jiguan,
    this.tizhong,
    this.zhuanye,
    this.sex,
    this.hunyinzhuangtai,
    this.minzu,
    this.gongzuonianxian,
    this.zhengzhimianmao,
    this.hukoudizhi,
    this.xianzhudizhi,
    this.jinjilianxiren,
    this.jinjilianxirendianhua,
    this.chushengnianyue,
  });

  WorkerEducationBackgroundModel.fromJson(Map<String, dynamic> json) {
    name = json['name'] ?? '';
    jiguan = json['jiguan'] ?? '';
    tizhong = json['tizhong'] ?? '';
    zhuanye = json['zhuanye'] ?? '';
    minzu = json['minzu'] ?? '';
    gongzuonianxian = json['gongzuonianxian'] ?? '';
    zhengzhimianmao = json['zhengzhimianmao'] ?? '';
    hukoudizhi = json['hukoudizhi'] ?? '';
    xianzhudizhi = json['xianzhudizhi'] ?? '';
    jinjilianxiren = json['jinjilianxiren'] ?? '';
    jinjilianxirendianhua = json['jinjilianxirendianhua'] ?? '';
    chushengnianyue = json['chushengnianyue'] ?? '';
    sex = json['sex'] ?? '';
    hunyinzhuangtai = json['hunyinzhuangtai'] ?? '';
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['jiguan'] = this.jiguan;
    data['tizhong'] = this.tizhong;
    data['zhuanye'] = this.zhuanye;
    data['minzu'] = this.minzu;
    data['gongzuonianxian'] = this.gongzuonianxian;
    data['zhengzhimianmao'] = this.zhengzhimianmao;
    data['hukoudizhi'] = this.hukoudizhi;
    data['xianzhudizhi'] = this.xianzhudizhi;
    data['jinjilianxiren'] = this.jinjilianxiren;
    data['jinjilianxirendianhua'] = this.jinjilianxirendianhua;
    data['chushengnianyue'] = this.chushengnianyue;
    data['sex'] = this.sex;
    data['hunyinzhuangtai'] = this.hunyinzhuangtai;
    return data;
  }
}
